package com.example.service.impl;

import com.example.dao.RoleDao;
import com.example.domain.Role;
import com.example.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleDao roleDao;

    public List<Role> list() {
        return roleDao.getAll();
    }

    public void save(Role role) {
        roleDao.save(role);
    }
}
